<template>
  <div class="posttable">
    <el-row style="margin-bottom: 10px;">
      <el-col :span="24" style="padding-right: 30px;padding-left: 40px;margin-top: 10px;">
        <el-row>
          <el-col>
            <el-col style="width:20%;" class="bot">
              <el-row>
                <el-col>
                  <p class="title">客户名称</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.customerName}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot">
              <el-row>
                <el-col>
                  <p class="title">需求名称</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.postName}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot">
              <el-row>
                <el-col>
                  <p class="title">职位级别</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.postLevel}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot"  v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">姓名</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.name}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot"  v-if="radio == '面试官'">
              <el-row>
                <el-col>
                  <p class="title">面试官</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewName}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">笔试</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.write}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '面试官'">
              <el-row>
                <el-col>
                  <p class="title">约面时间</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewTime}}</p>
                </el-col>
              </el-row>
            </el-col>
          </el-col>

          <el-col>           
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">面谈次数</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewNo}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">约面时间</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.approximateTime}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">到达时间</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.arriveTime}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">面试时长</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewTime}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">面试结果</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewResult}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '面试官'">
              <el-row>
                <el-col>
                  <p class="title">面试时长</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewLength}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '面试官'">
              <el-row>
                <el-col>
                  <p class="title">有无笔试</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.isWrite}}</p>
                </el-col>
              </el-row>
            </el-col>
            <el-col style="width:20%;" class="bot" v-if="radio == '面试官'">
              <el-row>
                <el-col>
                  <p class="title">面试官性格</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewNature}}</p>
                </el-col>
              </el-row>
            </el-col>
          </el-col>

          <el-col v-if="radio == '候选人'">            
            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">候选人形象</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.interviewImage}}</p>
                </el-col>
              </el-row>
            </el-col>

            <el-col style="width:20%;" class="bot" v-if="radio == '候选人'">
              <el-row>
                <el-col>
                  <p class="title">最终结果</p>
                </el-col>
                <el-col>
                  <p class="text">{{info.finalResult}}</p>
                </el-col>
              </el-row>
            </el-col>          
          </el-col>

    
          <el-col class="bot" v-if="radio == '候选人'">
            <el-row>
              <el-col>
                <p class="title">未通过原因</p>
              </el-col>
              <el-col>
                <p class="text">{{info.referReason}}</p>
              </el-col>
            </el-row>
          </el-col>
          <el-col class="bot" v-if="radio == '候选人'">
            <el-row>
              <el-col>
                <p class="title">筛选简历目前存在的问题</p>
              </el-col>
              <el-col>
                <p class="text">{{info.question}}</p>
              </el-col>
            </el-row>
          </el-col>

          <el-col class="bot" v-if="radio == '面试官'">
            <el-row>
              <el-col>
                <p class="title">面试中常问的问题</p>
              </el-col>
              <el-col>
                <p class="text">{{info.question}}</p>
              </el-col>
            </el-row>
          </el-col>
          <el-col class="bot" v-if="radio == '面试官'">
            <el-row>
              <el-col>
                <p class="title">面试官注重的要素</p>
              </el-col>
              <el-col>
                <p class="text">{{info.element}}</p>
              </el-col>
            </el-row>
          </el-col>
        </el-row>
      </el-col>
    </el-row>
  </div>
</template>
<script>
import axios from "axios";
import qs from "qs";
import moment from "moment";

export default {
  name: "interviewdetail",
  props:{
    detailCode: {
      type: Object
    },
     radio: {
      type: String
    }
    },
  data() {
    return {
      id: null,
      info: {},
      show: true
    };
  },
  created() {
    this.id = this.detailCode.id;

    this.getdetail();
  },
  methods: {
    getdetail() {
      if (this.radio == "候选人") {
        axios.post(this.url + "/interviewFeedBack/getCandidateById", {
        id: this.id + ""
      }).then(res => {
        this.unlogin(res.data.code)
        if (res.data.code == 200) {
          this.info = res.data.data;
        }
      })
      } else if (this.radio == "面试官") {
        axios.post(this.url + "/interviewFeedBack/getInterviewById", {
        id: this.id + ""
      }).then(res => {
        this.unlogin(res.data.code)
        if (res.data.code == 200) {
          this.info = res.data.data;
        }
      })
      }
    }
  }
};
</script>
<style scoped>
.title {
  color: #757575;
  margin-bottom: 10px;
  font-size: 14px;
}

.text {
  color: #333333;
  font-weight: 700;
  font-size: 14px;
  word-break: break-all;
  white-space: pre-line;
}

.bot {
  margin-bottom: 30px;
}

.Line {
  border: 0.5px solid #e8e8e8;
  margin-bottom: 30px;
}

@media screen and (min-width: 1200px) and (max-width: 1900px) {
  .word {
    word-break: break-all;
    width: 200px;
  }
}
</style>
